package com.rdtravel.web;

import com.rdtravel.entities.DepartureLocation;
import com.rdtravel.entities.Destination;
import com.rdtravel.valueobjects.Period;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

class TripsSearchForm {
	@NotNull(message = "{destinationNotFound}")
	private Destination destination;
	@NotNull(message = "{departureLocationNotFound}")
	private DepartureLocation departureLocation;
	@Valid
	private Period period;
	@NotNull
	@Min(0)
	private Integer seats;

	public Period getPeriod() {
		return period;
	}

	public void setPeriod(Period period) {
		this.period = period;
	}

	public Destination getDestination() {
		return destination;
	}

	public void setDestination(Destination destination) {
		this.destination = destination;
	}

	public DepartureLocation getDepartureLocation() {
		return departureLocation;
	}

	public void setDepartureLocation(DepartureLocation departureLocation) {
		this.departureLocation = departureLocation;
	}

	public Integer getSeats() {
		return seats;
	}

	public void setSeats(Integer seats) {
		this.seats = seats;
	}

	@Override
	public String toString() {
		return "TripsSearchForm [destination=" + destination
				+ ", departureLocationName=" + departureLocation + ", period="
				+ period + ", seats=" + seats + "]";
	}

}
